<?php
$Switcher = $MT_mod_cust['Switcher'];

switch($Switcher->next())
{
	case 'pict':
	{
		$enckey=$Switcher->next();
		if($enckey!=null)
		{
	  		$deckey = pictkey_decrypt($enckey);
	  		$key=substr($deckey,0,4);
			$imgpng = pictkey_genpict($key);
			header('Content-type: image/png');
			header('Content-Length: ' . strlen($imgpng));
			echo $imgpng;
		}
		else
		{
			$imgpng = pictkey_genpict('    ');
			header('Content-type: image/png');
			header('Content-Length: ' . strlen($imgpng));
			echo $imgpng;
		}
	}
	break;
	default:
	{
	}
	break;
}
?>